#ifndef CONFIG_H_
#define CONFIG_H_

#include "ints.h"
#include "kbc.h"
#include "timer.h"
#include "vg.h"
#include "Gqueue.h"
#include "scancode.h"

#define READY 0
#define PLAY 1
#define STOP 2

void mouse_isr(void);
void kbd_isr(void);
void t0_isr(void);
int get_time(int* hour, int* minute, int* second);

typedef struct
{
	_go32_dpmi_seginfo old_kbd_isr;
	_go32_dpmi_seginfo old_t0_isr;
	_go32_dpmi_seginfo old_mouse_isr;
	_go32_dpmi_seginfo old_rtc_isr;
	GQueue* music_queue;
	__dpmi_meminfo map;
	
	int jumpKey;
	int leftKey;
	int rightKey;
	
	char* video_base;
	char* table;
	int* playState;
	int secBegin;
	int minBegin;
	int hourBegin;
	int secActual;
	int minActual;
	int hourActual;
	
} ConfigInfo;

Bool initialize(ConfigInfo *conf);

void finalize(ConfigInfo *conf);

void actualTime(ConfigInfo *conf);

void initializeMusic(int musicNumber);

int map(long x, long in_min, long in_max, long out_min, long out_max);
 
#endif
